package com.easylinkin.linkappapi.circuit.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.easylinkin.linkappapi.common.translate.CodeI18n;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 断路器告警/流水/故障记录
 * @author lyk
 * @date 2025/6/16 下午 2:00
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("rail_circuit_givealarm")
@CodeI18n
public class RailCircuitGivealarm extends Model<RailCircuitGivealarm> implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 设备代码
     */
    @TableField("device_code")
    private String deviceCode;
    /**
     *告警类型，字典 0报警 ，1故障
     */
    @TableField("give_type")
    private String giveType;
    /**
     * 故障类型 可取字典
     */
    @TableField("fault_type")
    private String faultType;
    /**
    * 创建时间/故障时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 租户id
     */
    @TableField("tenant_id")
    private String tenantId;
    /**
     * 告警/故障内容
     */
    @TableField("content")
    private String content;
    /**
     * 故障报警代码
     */
    @TableField("code")
    private String code;
    /**
     *报警故障说明
     */
    @TableField("fault_description")
    private String faultDescription;
    /**
     * 报警故障值
     */
    @TableField("fault_value")
    private Double faultValue;

    /**
     * a相位参数
     */
    @TableField("a_phase_current")
    private Double aPhaseCurrent;
    @TableField("a_phase_voltage")
    private Double aPhaseVoltage;
    @TableField("a_phase_power")
    private Double aPhasePower;

    /**
     * b相位参数
     */
    @TableField("b_phase_current")
    private Double bPhaseCurrent;
    @TableField("b_phase_voltage")
    private Double bPhaseVoltage;
    @TableField("b_phase_power")
    private Double bPhasePower;
    /**
     * b相位参数
     */
    @TableField("c_phase_current")
    private Double cPhaseCurrent;
    @TableField("c_phase_voltage")
    private Double cPhaseVoltage;
    @TableField("c_phase_power")
    private Double cPhasePower;
    /**
     * 总功率
     */
    @TableField("active_power")
    private Double activePower;
    /**
     * 剩余电流
     */
    @TableField("residual_current")
    private Double residualCurrent;
    /**
     *在线状态，0离线，1在线
     */
    @TableField("line_online_state")
    private String lineOnlineState;
    /**
     * 开关状态 0断开断闸，1闭合合闸
     */
    @TableField("switch_state")
    private String switchState;






}
